import moment from 'moment';
// 命名规范：Arr普通枚举  field下拉字段枚举  Map表格字段枚举

// 表头筛选字段
const headerForm = {};
// 表格字段
const tableColumn = {
  // 列表表格
  scoresTableMap: [
    { prop: 'username', type: 'text', label: '用户名', width: 160, tooltip: true },
    { prop: 'realName', type: 'text', label: '姓名', width: 160, tooltip: true },
    { prop: 'salaryScore', type: 'text', label: '收入评分' },
    { prop: 'eduScore', type: 'text', label: '学历评分' },
    { prop: 'assetsScore', type: 'text', label: '资产评分' },
    { prop: 'familyScore', type: 'text', label: '原生家庭评分' },
    { prop: 'heightScore', type: 'text', label: '身高评分' },
    { prop: 'weightScore', type: 'text', label: '体重评分' },
    { prop: 'looksScore', type: 'text', label: '颜值评分' },
    { prop: 'figureScore', type: 'text', label: '身材评分' },
    { prop: 'albumScore', type: 'text', label: '相册评分总分' },
    { prop: 'totalScore', type: 'text', label: '总分评分' },
    { prop: 'createTime', type: 'text', label: '创建时间', width: 160 },
    { prop: 'updateTime', type: 'text', label: '更新时间', width: 160 },
  ],
};
// 表单字段
const editForm = {
  // 筛选表单
  scoresFilterMap: [
    {
      prop: 'username',
      type: 'input',
      label: '用户名',
      clearable: true,
      width: 100,
      col: 0,
    },
    {
      prop: 'realName',
      type: 'input',
      label: '姓名',
      clearable: true,
      width: 100,
      col: 0,
    },
    {
      prop: 'salaryScore',
      type: 'inputRange',
      label: '收入评分',
      children: [
        {
          prop: 'salaryScoreMin',
          type: 'inputNumber',
          label: '最小值',
        },
        {
          prop: 'separator',
          type: 'separator',
          label: '-',
          col: 4,
        },
        {
          prop: 'salaryScoreMax',
          type: 'inputNumber',
          label: '最大值',
        },
      ],
      width: 100,
      col: 0,
    },
    {
      prop: 'eduScore',
      type: 'inputRange',
      label: '学历评分',
      children: [
        {
          prop: 'eduScoreMin',
          type: 'inputNumber',
          label: '最小值',
        },
        {
          prop: 'separator',
          type: 'separator',
          label: '-',
          col: 4,
        },
        {
          prop: 'eduScoreMax',
          type: 'inputNumber',
          label: '最大值',
        },
      ],
      width: 100,
      col: 0,
    },
    {
      prop: 'assetsScore',
      type: 'inputRange',
      label: '资产评分',
      children: [
        {
          prop: 'assetsScoreMin',
          type: 'inputNumber',
          label: '最小值',
        },
        {
          prop: 'separator',
          type: 'separator',
          label: '-',
          col: 4,
        },
        {
          prop: 'assetsScoreMax',
          type: 'inputNumber',
          label: '最大值',
        },
      ],
      width: 100,
      col: 0,
    },
    {
      prop: 'familyScore',
      type: 'inputRange',
      label: '原生家庭评分',
      children: [
        {
          prop: 'familyScoreMin',
          type: 'inputNumber',
          label: '最小值',
        },
        {
          prop: 'separator',
          type: 'separator',
          label: '-',
          col: 4,
        },
        {
          prop: 'familyScoreMax',
          type: 'inputNumber',
          label: '最大值',
        },
      ],
      width: 100,
      col: 0,
    },
    {
      prop: 'heightScore',
      type: 'inputRange',
      label: '身高评分',
      children: [
        {
          prop: 'heightScoreMin',
          type: 'inputNumber',
          label: '最小值',
        },
        {
          prop: 'separator',
          type: 'separator',
          label: '-',
          col: 4,
        },
        {
          prop: 'heightScoreMax',
          type: 'inputNumber',
          label: '最大值',
        },
      ],
      width: 100,
      col: 0,
    },
    {
      prop: 'weightScore',
      type: 'inputRange',
      label: '体重评分',
      children: [
        {
          prop: 'weightScoreMin',
          type: 'inputNumber',
          label: '最小值',
        },
        {
          prop: 'separator',
          type: 'separator',
          label: '-',
          col: 4,
        },
        {
          prop: 'weightScoreMax',
          type: 'inputNumber',
          label: '最大值',
        },
      ],
      width: 100,
      col: 0,
    },
    {
      prop: 'looksScore',
      type: 'inputRange',
      label: '颜值评分',
      children: [
        {
          prop: 'looksScoreMin',
          type: 'inputNumber',
          label: '最小值',
        },
        {
          prop: 'separator',
          type: 'separator',
          label: '-',
          col: 4,
        },
        {
          prop: 'looksScoreMax',
          type: 'inputNumber',
          label: '最大值',
        },
      ],
      width: 100,
      col: 0,
    },
    {
      prop: 'figureScore',
      type: 'inputRange',
      label: '身材评分',
      children: [
        {
          prop: 'figureScoreMin',
          type: 'inputNumber',
          label: '最小值',
        },
        {
          prop: 'separator',
          type: 'separator',
          label: '-',
          col: 4,
        },
        {
          prop: 'figureScoreMax',
          type: 'inputNumber',
          label: '最大值',
        },
      ],
      width: 100,
      col: 0,
    },
    {
      prop: 'albumScore',
      type: 'inputRange',
      label: '相册评分总分',
      children: [
        {
          prop: 'albumScoreMin',
          type: 'inputNumber',
          label: '最小值',
        },
        {
          prop: 'separator',
          type: 'separator',
          label: '-',
          col: 4,
        },
        {
          prop: 'albumScoreMax',
          type: 'inputNumber',
          label: '最大值',
        },
      ],
      width: 100,
      col: 0,
    },
    {
      prop: 'totalScore',
      type: 'inputRange',
      label: '总分评分',
      children: [
        {
          prop: 'totalScoreMin',
          type: 'inputNumber',
          label: '最小值',
        },
        {
          prop: 'separator',
          type: 'separator',
          label: '-',
          col: 4,
        },
        {
          prop: 'totalScoreMax',
          type: 'inputNumber',
          label: '最大值',
        },
      ],
      width: 100,
      col: 0,
    },
    {
      prop: 'createTime',
      type: 'datePicker',
      label: '创建时间',
      startProp: 'createTimeStartTime',
      endProp: 'createTimeEndTime',
      dateType: 'datetimerange',
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      pickerOptions: {
        disabledDate: function (time) {
          return time.getTime() > moment().format('x');
        },
      },
      width: 100,
      col: 0,
      xs: 12,
      sm: 12,
      md: 8,
      lg: 8,
      xl: 6,
    },
    {
      prop: 'updateTime',
      type: 'datePicker',
      label: '更新时间',
      startProp: 'updateTimeStartTime',
      endProp: 'updateTimeEndTime',
      dateType: 'datetimerange',
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      pickerOptions: {
        disabledDate: function (time) {
          return time.getTime() > moment().format('x');
        },
      },
      width: 108,
      col: 0,
      xs: 12,
      sm: 12,
      md: 8,
      lg: 8,
      xl: 6,
    },
  ],
};
// 其他映射
const otherMap = {};
// 表单字段校验
const editRule = {};
export default {
  headerForm,
  tableColumn,
  editForm,
  otherMap,
  editRule,
};
